﻿using System.ComponentModel.DataAnnotations;
using Lari.Configuration;

namespace Lari.Services.ViewModel
{
    public class UserModel
    {
        public int RoleId { get; set; }
        public UserModel(bool rememberMe=false)
        {
            RememberMe = rememberMe;
        }
        public UserModel()
        {
            RememberMe = false;
        }
        [StringLength(20, ErrorMessage = MessageCode.Generic.LengthExceeded)]
        [Required(ErrorMessage = MessageCode.Generic.ReguiredFldMsg)]
        [Display(Name = "User Id")]
        public string UserId
        {
            get;
            set;
        }

        [StringLength(20, ErrorMessage = MessageCode.Generic.LengthExceeded)]
        [Required(ErrorMessage = MessageCode.Generic.ReguiredFldMsg)]
        public string Password
        {
            get;
            set;
        }
        [Display(Name = "Remember Me")]
        public bool RememberMe { get; private set; }
    }
}
